<template>
    <yk-space dir="vertical" style="width: 100%; margin-bottom: 8px;" >
         <TopTitle name="随笔随记" :is-search="true" style="width: 100%; margin-bottom: 8px;" @search="search" />
         <yk-space style="width: 100%;" size="l">
            <Diary style="width: 60%;" :pageSize="4" :searchTerm="searchTerm" :getRefresh="getRefresh"/>
             <DiaryEditor style="flex:none;width:40% ;" :pageSize="4" :searchTerm="searchTerm" @getData="getData"/>
         </yk-space>
    </yk-space>
</template>

<script setup lang="ts">
import { ref } from 'vue'
import TopTitle from '../components/bar/TopTitle.vue';
import Diary from '../components/diarys/diary.vue';
import DiaryEditor from '../components/diarys/diary-editor.vue';
const getRefresh=ref<number>(0)
const getData= () => {
    getRefresh.value++
}

//搜索事件
//搜索内容
const searchTerm = ref<string>('')
const search = (val: string) => {
    searchTerm.value = val
}
</script>

<style scoped lang="less">  

</style>